import java.util.*;

public class CheckSudokuSolution {
    public static void main(String[] args) {
        int[][] grid = readASolution();
        
        System.out.println(isValid(grid) ? "Atbilst" : "Neatbilst");
    }
    
    public static int[][] readASolution() {
        Scanner scan = new Scanner(System.in);
        System.out.println("Ievadi Sudoku atrisinaajumu: ");
        int[][] grid = new int[9][9];
        for (int i = 0; i < 9; i++) {
            for (int j = 0; j < 9; j++) {
                grid[i][j] = scan.nextInt();
            }
        }
        return grid;
    }
    
    public static boolean isValid(int[][] grid) {
        for (int i = 0; i < 9; i++) {
            if (!is1To9(grid[i])) {
                return false;
            }
        }
        
        for (int i = 0; i < 9; i++) {
            int[] column = new int[9];
            for (int j = 0; j < 9; j++) {
                column[i] = grid[i][j];
            }
            
            if (!is1To9(column)) {
                return false;
            }
        }
        
        for (int i = 0; i < 3; i++) {
            for (int j = 0; j < 3; j++) {
                int k = 0;
                int[] list = new int[9];
                for (int l = i * 3; l < i * 3 + 3; l++) {
                    for (int m = j * 3; m < j * 3 + 3; m++) {
                        list[k++] = grid[l][m];
                    }
                }
                
                if (!is1To9(list)) {
                    return false;
                }
            }
        }
        return false;
    }
    
    public static boolean is1To9(int[] list) {
        int[] temp = new int[list.length];
        System.arraycopy(list, 0, temp, 0, list.length);
        
        java.util.Arrays.sort(temp);
        for (int i = 0; i < 9; i++) {
            if (temp[i] != i + 1) {
                return false;
            }
        }
        return true;
    }
}